import{User} from '../models/User';
import{Token} from '../models/Token';
import{Doc} from '../models/Doc';
import{BaseService} from './BaseService';
import{DocsDao} from '../dao/DocsDao';
import{ Group} from '../models/Group';
export class DocsService extends BaseService
{
  docsDao:DocsDao;
  constructor()
  {
    super();
    this.docsDao = new DocsDao();
  }

  addDoc(doc:Doc,callback:Function)
  {
    this.docsDao.add(doc,callback);
  }

  getDoc(docId:string,callback:Function)
  {
    this.docsDao.get(docId,callback);
  }

  getDocsByGroupId(groupId:string,callback:Function)
  {
    this.docsDao.getsByGroudId(groupId,callback);
  }

  getDocsByProjectId(projectId:string,callback:Function)
  {
    this.docsDao.getsByProjectId(projectId,callback);
  }

  udpateDoc(doc:Doc,callback:Function)
  {
    this.docsDao.updateDoc(doc,callback);
  }

  deleteDoc(docId:string,callback:Function)
  {
    this.docsDao.delete(docId,callback);
  }

}
